from PySide2.QtWidgets import *
from PySide2.QtCore import QFile, QStringListModel, Qt
from PySide2.QtUiTools import QUiLoader
from PySide2.QtWidgets import QFileDialog

from ExcelData import EData


class PublishDialog:

    def __init__(self):
        super(PublishDialog, self).__init__()
        self.edata = EData()
        # 从文件中加载UI定义
        qfile = QFile("data\\publish.ui")
        qfile.open(QFile.ReadOnly)
        qfile.close()
        # 从UI定义中动态创建一个相应的窗口对象, 将其内部文件定义为self.ui.button
        self.ui = QUiLoader().load(qfile)


    def show(self):
        print("打开发布UI")
        self.loadFromData()
        self.ui.show()

    def onBthCloseClick(self):
        self.ui.close()


    def loadFromData(self):
        pass